﻿
using System;
using System.Collections.Generic;
using System.Linq;
using Redbrick.Silverlight.Common;

namespace Moria
{

	public class Treasure
	{

		#region Consts & Settings

		private const int CostAdjust = 100;
		public const int OBJ_GREAT = 12;   /* 1/n Chance of item being a Great Item */

		#endregion Consts & Settings

		#region Declarations

		static List<Treasure> sorted_objects = new List<Treasure>();
		static int[] t_level = null;
		#endregion Declarations

		#region Constructor
		static Treasure()
		{
			init_t_level();
		}
		private Treasure(string name, uint flags, ItemType tval, int tchar, int p1, int cost, int subval, int number,
								int weight, int tohit, int todam, int ac, int toac, int[] damage, int level)
		{
			this.Name = name;
			this.Flags = (ItemFlag)flags;
			this.ItemType = tval;
			this.Symbol = tchar;
			this.Misc = p1;
			this.Cost = cost;
			this.SubType = subval;
			this.ItemCount = number;
			this.Weight = weight;
			this.ToHit = tohit;
			this.ToDamage = todam;
			this.AC = ac;
			this.ToAC = toac;
			this.Damage = damage;
			this.Level = level;

			if (CostAdjust != 100)
			{
				this.Cost = ((this.Cost * CostAdjust) + 50) / 100;
			}

		}


		#endregion Constructor

		#region Methods
		static void init_t_level()
		{
			t_level = Sequence.InitArray(Treasure.MAX_OBJ_LEVEL + 1, 0);
			for (int i = 0; i < MAX_DUNGEON_OBJ; i++)
				t_level[Treasure.Table[i].Level]++;

			for (int i = 1; i <= MAX_OBJ_LEVEL; i++)
				t_level[i] += t_level[i - 1];


			sorted_objects = Treasure.Table.OrderBy((t) => t.Level).ToList();
		}

		public static Treasure get_obj_num(int level)
		{
			int i = 0;
			int j = 0;
			int maxObjLevel = Treasure.MAX_OBJ_LEVEL;

			if (level == 0)
			{
				i = Dice.RandInt(t_level[0]) - 1;
			}
			else
			{
				if (level >= maxObjLevel)
				{
					level = maxObjLevel;
				}
				else if (Dice.RandInt(OBJ_GREAT) == 1)
				{
					level = level * maxObjLevel / Dice.RandInt(maxObjLevel) + 1;
					if (level > maxObjLevel)
						level = maxObjLevel;
				}

				if (Dice.RandInt(2) == 1)
				{
					i = Dice.RandInt(t_level[level]) - 1;
				}
				else /* Choose three objects, pick the highest level. */
				{
					i = Dice.RandInt(t_level[level]) - 1;

					j = Dice.RandInt(t_level[level]) - 1;
					if (i < j) i = j;

					j = Dice.RandInt(t_level[level]) - 1;
					if (i < j) i = j;

					j = sorted_objects[i].Level;
					if (j == 0) i = Dice.RandInt(t_level[0]) - 1;
					else i = Dice.RandInt(t_level[j] - t_level[j - 1]) - 1 + t_level[j - 1];
				}
			}
			return sorted_objects[i];
		}

		#endregion Methods

		#region Events


		#endregion Events

		#region Properties
		public bool IsDebug { get; set; }
		public static Treasure Nothing { get { return Table.Last(); } }

		public string Name { get; private set; }	    // Object Name		
		public ItemFlag Flags { get; private set; }		// Special flags	
		public ItemType ItemType { get; private set; }	// ItemType ItemCount	
		public int Symbol { get; private set; }		// Character representation
		public int Misc { get; private set; }		    // Misc. use variable	
		public int Cost { get; private set; }		// Cost of item		
		public int SubType { get; private set; }		// Sub-category ItemCount	
		public int ItemCount { get; private set; }		// Number of Items	
		public int Weight { get; private set; }	    // Weight		
		public int ToHit { get; private set; }		// Plusses to hit	
		public int ToDamage { get; private set; }		// Plusses to Damage	
		public int AC { get; private set; }		    // Normal AC		
		public int ToAC { get; private set; }		// Plusses to AC	
		public int[] Damage { get; private set; }	// Damage when hits	
		public int Level { get; private set; }		// Level item first found 

		public bool IsNothing { get { return this.ItemType == ItemType.NOTHING; } }
        public bool IsOpenDoor { get { return this.ItemType == Moria.ItemType.OPEN_DOOR; } }
		public bool IsClosedDoor { get { return this.ItemType == Moria.ItemType.CLOSED_DOOR; } }
		public bool IsSecretDoor { get { return this.ItemType == Moria.ItemType.SECRET_DOOR; } }
		public bool IsStoreDoor { get { return this.ItemType == ItemType.STORE_DOOR; } }
		public bool IsMisc { get { return this.ItemType == ItemType.MISC; } }
		public bool IsChest { get { return this.ItemType == ItemType.CHEST; } }
		public bool IsSlingAmmo { get { return this.ItemType == ItemType.SLING_AMMO; } }
		public bool IsBolt { get { return this.ItemType == ItemType.BOLT; } }
		public bool IsArrow { get { return this.ItemType == ItemType.ARROW; } }
		public bool IsSpike { get { return this.ItemType == ItemType.SPIKE; } }
		public bool IsLight { get { return this.ItemType == ItemType.LIGHT; } }
		public bool IsBow { get { return this.ItemType == ItemType.BOW; } }
		public bool IsHafted { get { return this.ItemType == ItemType.HAFTED; } }
		public bool IsPolearm { get { return this.ItemType == ItemType.POLEARM; } }
		public bool IsSword { get { return this.ItemType == ItemType.SWORD; } }
		public bool IsDigging { get { return this.ItemType == ItemType.DIGGING; } }
		public bool IsBoots { get { return this.ItemType == ItemType.BOOTS; } }
		public bool IsGloves { get { return this.ItemType == ItemType.GLOVES; } }
		public bool IsCloak { get { return this.ItemType == ItemType.CLOAK; } }
		public bool IsHelm { get { return this.ItemType == ItemType.HELM; } }
		public bool IsShield { get { return this.ItemType == ItemType.SHIELD; } }
		public bool IsHardArmor { get { return this.ItemType == ItemType.HARD_ARMOR; } }
        public bool IsWeapon { get { return (this.ItemType >= ItemType.BOW) && (this.ItemType <= ItemType.SWORD); } }
        public bool IsArmor { get { return (this.ItemType >= ItemType.BOOTS) && (this.ItemType <= ItemType.SOFT_ARMOR); } }
        public bool IsAmmo { get { return (this.ItemType >= ItemType.SLING_AMMO) && (this.ItemType <= ItemType.SPIKE); } }
        public bool IsAmulet { get { return this.ItemType == ItemType.AMULET; } }
		public bool IsRing { get { return this.ItemType == ItemType.RING; } }
		public bool IsStaff { get { return this.ItemType == ItemType.STAFF; } }
		public bool IsWand { get { return this.ItemType == ItemType.WAND; } }
		public bool IsScroll { get { return this.ItemType == ItemType.SCROLL1 || this.ItemType == ItemType.SCROLL2; } }
		public bool IsPotion { get { return this.ItemType == ItemType.POTION1 || this.ItemType == ItemType.POTION2; } }
		public bool IsFlask { get { return this.ItemType == ItemType.FLASK; } }
		public bool IsFood { get { return this.ItemType == ItemType.FOOD; } }
		public bool MagicBook { get { return this.ItemType == ItemType.MAGIC_BOOK; } }
		public bool IsPrayerBook { get { return this.ItemType == ItemType.PRAYER_BOOK; } }
		public bool IsGold { get { return this.ItemType == ItemType.GOLD; } }
		public bool IsTrap { get { return this.ItemType == ItemType.INVIS_TRAP || this.ItemType == ItemType.VIS_TRAP; } }
		public bool IsVisibleTrap { get { return this.ItemType == ItemType.VIS_TRAP ; } }
		public bool IsInvisibleTrap { get { return this.ItemType == ItemType.INVIS_TRAP; } }
		public bool IsStaircase { get { return this.ItemType == ItemType.UP_STAIR || this.ItemType == ItemType.DOWN_STAIR; } }
		public bool IsRubble { get { return this.ItemType == ItemType.RUBBLE; } }

		public bool CanPickup { get { return this.ItemType <= ItemType.MAX_PICK_UP && this.ItemType >= ItemType.MIN_PICK_UP; } }
		public bool IsWearable { get { return this.ItemType >= ItemType.MIN_WEAR && ItemType <= ItemType.MAX_WEAR; } }
		public bool IsEnchantable { get { return this.ItemType >= ItemType.MIN_ENCHANT && ItemType <= ItemType.MAX_ENCHANT; } }
		public bool IsVisible { get { return this.ItemType >= ItemType.MIN_VISIBLE && ItemType <= ItemType.MAX_VISIBLE; } }
		public bool IsDoor { get { return this.ItemType >= ItemType.MIN_DOORS && this.ItemType <= ItemType.MAX_DOORS; } }

		#endregion Properties


		
		private static Lazy<int> maxObjLevel = new Lazy<int>(() => Table.Max(i => i.Level));
		private static Lazy<int> maxGold = new Lazy<int>( () => Table.Count(i => i.IsGold) );
        private static Lazy<int> maxTrap = new Lazy<int>(() => Table.Count(i => i.IsTrap));
        private static Lazy<int> objGoldList = new Lazy<int>(() => Table.FirstIndexOf(i => i.IsGold));
        private static Lazy<int> objTrapList = new Lazy<int>(() => Table.FirstIndexOf(i => i.IsTrap));
        private static Lazy<int> objStoreDoor = new Lazy<int>(() => Table.FirstIndexOf(i => i.IsStoreDoor));

		public static int MAX_MUSH { get { return 22; } }
		public static int MAX_DUNGEON_OBJ { get { return 344; } }/* Number of dungeon objects */
		public static int OBJ_NOTHING { get { return Table.Count - 1; } }

		public static int MAX_OBJ_LEVEL { get { return maxObjLevel.Value; } }
        public static int OBJ_GOLD_LIST { get { return objGoldList.Value; } }
        public static int OBJ_TRAP_LIST { get { return objTrapList.Value; } }
        public static int MAX_GOLD { get { return maxGold.Value; } }
        public static int MAX_TRAP { get { return maxTrap.Value; } }
        public static int OBJ_STORE_DOOR { get { return objStoreDoor.Value; } }

		public static int OBJ_OPEN_DOOR { get { return Table.FirstIndexOf(i => i.ItemType == ItemType.OPEN_DOOR); } }
		public static int OBJ_CLOSED_DOOR { get { return Table.FirstIndexOf(i => i.ItemType == ItemType.CLOSED_DOOR); } }
		public static int OBJ_SECRET_DOOR { get { return Table.FirstIndexOf(i => i.ItemType == ItemType.SECRET_DOOR); } }
		public static int OBJ_DOWN_STAIR { get { return Table.FirstIndexOf(i => i.ItemType == ItemType.DOWN_STAIR); } }
		public static int OBJ_UP_STAIR { get { return Table.FirstIndexOf(i => i.ItemType == ItemType.UP_STAIR); } }

		public static Treasure ClosedDoor { get { return Table[OBJ_CLOSED_DOOR]; } }

		public static readonly List<Treasure> Table = new List<Treasure>()
		{
			#region Dungeon Items from 0 to MAX_DUNGEON_OBJ
			//					name											flags				tval			tchar		p1		cost subval	# wgt +hit +dmg ac +ac dmg level
			new Treasure("Poison"									,0x00000001,	ItemType.FOOD, ',',	  500,	   0,	64,   1,   1,	0,   0,	 0,   0,new int[]{0,0}	,  7),
			new Treasure("Blindness"								,0x00000002,	ItemType.FOOD, ',',	  500,	   0,	65,   1,   1,	0,   0,	 0,   0,new int[]{0,0}	,  9),
			new Treasure("Paranoia"									,0x00000004,	ItemType.FOOD, ',',	  500,	   0,	66,   1,   1,	0,   0,	 0,   0,new int[]{0,0}	,  9),
			new Treasure("Confusion"								,0x00000008,	ItemType.FOOD, ',',	  500,	   0,	67,   1,   1,	0,   0,	 0,   0,new int[]{0,0}	,  7),
			new Treasure("Hallucination"							,0x00000010,	ItemType.FOOD, ',',	  500,	   0,	68,   1,   1,	0,   0,	 0,   0,new int[]{0,0}	, 13),
			new Treasure("Cure Poison"								,0x00000020,	ItemType.FOOD, ',',	  500,	  60,	69,   1,   1,	0,   0,	 0,   0,new int[]{0,0}	,  8),
			new Treasure("Cure Blindness"							,0x00000040,	ItemType.FOOD, ',',	  500,	  50,	70,   1,   1,	0,   0,	 0,   0,new int[]{0,0}	, 10),
			new Treasure("Cure Paranoia"							,0x00000080,	ItemType.FOOD, ',',	  500,	  25,	71,   1,   1,	0,   0,	 0,   0,new int[]{0,0}	, 12),
			new Treasure("Cure Confusion"							,0x00000100,	ItemType.FOOD, ',',	  500,	  50,	72,   1,   1,	0,   0,	 0,   0,new int[]{0,0}	,  6),
			new Treasure("Weakness"									,0x04000200,	ItemType.FOOD, ',',	  500,	   0,	73,   1,   1,	0,   0,	 0,   0,new int[]{0,0}	,  7),
			new Treasure("Unhealth"									,0x04000400,	ItemType.FOOD, ',',	  500,	  50,	74,   1,   1,	0,   0,	 0,   0,new int[]{10,10}, 15),
			new Treasure("Restore Constitution"					,0x00010000,	ItemType.FOOD, ',',	  500,	 350,	75,   1,   1,	0,   0,	 0,   0,new int[]{0,0}	, 20),
			new Treasure("First-Aid"								,0x00200000,	ItemType.FOOD, ',',	  500,	   5,	76,   1,   1,	0,   0,	 0,   0,new int[]{0,0}	,  6),
			new Treasure("Minor Cures"								,0x00400000,	ItemType.FOOD, ',',	  500,	  20,	77,   1,   1,	0,   0,	 0,   0,new int[]{0,0}	,  7),
			new Treasure("Light Cures"								,0x00800000,	ItemType.FOOD, ',',	  500,	  30,	78,   1,   1,	0,   0,	 0,   0,new int[]{0,0}	, 10),
			new Treasure("Restoring"								,0x001F8040,	ItemType.FOOD, ',',	  500,	1000,	79,   1,   1,	0,   0,	 0,   0,new int[]{0,0}	, 30),
			new Treasure("Poison"									,0x00000001,	ItemType.FOOD, ',',	 1200,	   0,	80,   1,   1,	0,   0,	 0,   0,new int[]{0,0}	, 15),
			new Treasure("Hallucinations"							,0x00000010,	ItemType.FOOD, ',',	 1200,	   0,	81,   1,   1,	0,   0,	 0,   0,new int[]{0,0}	, 18),
			new Treasure("Cure Poison"								,0x00000020,	ItemType.FOOD, ',',	 1200,	  75,	82,   1,   1,	0,   0,	 0,   0,new int[]{0,0}	, 19),
			new Treasure("Unhealth"									,0x00000400,	ItemType.FOOD, ',',	 1200,	  25,	83,   1,   1,	0,   0,	 0,   0,new int[]{6,8}	, 28),
			new Treasure("Cure Serious Wounds"					,0x02000000,	ItemType.FOOD, ',',	 1200,	  75,	84,   1,   2,	0,   0,	 0,   0,new int[]{0,0}	, 16),
			new Treasure("& Ration~ of Food"						,0x00000000,	ItemType.FOOD, ',',	 5000,	   3,	90,   1,  10,	0,   0,	 0,   0,new int[]{0,0}	,  0),
			new Treasure("& Ration~ of Food"						,0x00000000,	ItemType.FOOD, ',',	 5000,	   3,	90,   1,  10,	0,   0,	 0,   0,new int[]{0,0}	,  5),
			new Treasure("& Ration~ of Food"						,0x00000000,	ItemType.FOOD, ',',	 5000,	   3,	90,   1,  10,	0,   0,	 0,   0,new int[]{0,0}	, 10),
			new Treasure("& Slime Mold~"							,0x00000000,	ItemType.FOOD, ',',	 3000,	   2,	91,   1,   5,	0,   0,	 0,   0,new int[]{0,0}	,  1),
			new Treasure("& Piece~ of Elvish Waybread"		,0x02000020,	ItemType.FOOD, ',',	 7500,	  10,	92,   1,   3,	0,   0,	 0,   0,new int[]{0,0}	,  6),
			new Treasure("& Piece~ of Elvish Waybread"		,0x02000020,	ItemType.FOOD, ',',	 7500,	  10,	92,   1,   3,	0,   0,	 0,   0,new int[]{0,0}	, 12),
			new Treasure("& Piece~ of Elvish Waybread"		,0x02000020,	ItemType.FOOD, ',',	 7500,	  10,	92,   1,   3,	0,   0,	 0,   0,new int[]{0,0}	, 20),
			new Treasure("& Dagger (Main Gauche)"				,0x00000000,	ItemType.SWORD, '|',	    0,	  25,	1,   1,  30,	0,   0,	 0,   0,new int[]{1,5}	,  2),
			new Treasure("& Dagger (Misericorde)"				,0x00000000,	ItemType.SWORD, '|',	    0,	  10,	2,   1,  15,	0,   0,	 0,   0,new int[]{1,4}	,  0),
			new Treasure("& Dagger (Stiletto)"					,0x00000000,	ItemType.SWORD, '|',	    0,	  10,	3,   1,  12,	0,   0,	 0,   0,new int[]{1,4}	,  0),
			new Treasure("& Dagger (Bodkin)"						,0x00000000,	ItemType.SWORD, '|',	    0,	  10,	4,   1,  20,	0,   0,	 0,   0,new int[]{1,4}	,  1),
			new Treasure("& Broken dagger"						,0x00000000,	ItemType.SWORD, '|',	    0,	   0,	5,   1,  15,  -2,  -2,	 0,   0,new int[]{1,1}	,  0),
			new Treasure("& Backsword"								,0x00000000,	ItemType.SWORD, '|',	    0,	  60,	6,   1,  95,	0,   0,	 0,   0,new int[]{1,9}	,  7),
			new Treasure("& Bastard Sword"						,0x00000000,	ItemType.SWORD, '|',	    0,	 350,	7,   1, 140,	0,   0,	 0,   0,new int[]{3,4}	, 14),
			new Treasure("& Thrusting Sword (Bilbo)"			,0x00000000,	ItemType.SWORD, '|',	    0,	  60,	8,   1,  80,	0,   0,	 0,   0,new int[]{1,6}	,  4),
			new Treasure("& Thrusting Sword (Baselard)"		,0x00000000,	ItemType.SWORD, '|',	    0,	  80,	9,   1, 100,	0,   0,	 0,   0,new int[]{1,7}	,  5),
			new Treasure("& Broadsword"							,0x00000000,	ItemType.SWORD, '|',	    0,	 255,	10,   1, 150,	0,   0,	 0,   0,new int[]{2,5}	,  9),
			new Treasure("& Two-Handed Sword (Claymore)"		,0x00000000,	ItemType.SWORD, '|',	    0,	 775,	11,   1, 200,	0,   0,	 0,   0,new int[]{3,6}	, 30),
			new Treasure("& Cutlass"								,0x00000000,	ItemType.SWORD, '|',	    0,	  85,	12,   1, 110,	0,   0,	 0,   0,new int[]{1,7}	,  7),
			new Treasure("& Two-Handed Sword (Espadon)"		,0x00000000,	ItemType.SWORD, '|',	    0,	 655,	13,   1, 180,	0,   0,	 0,   0,new int[]{3,6}	, 35),
			new Treasure("& Executioner's Sword"				,0x00000000,	ItemType.SWORD, '|',	    0,	 850,	14,   1, 260,	0,   0,	 0,   0,new int[]{4,5}	, 40),
			new Treasure("& Two-Handed Sword (Flamberge)"	,0x00000000,	ItemType.SWORD, '|',	    0,	1000,	15,   1, 240,	0,   0,	 0,   0,new int[]{4,5}	, 45),
			new Treasure("& Foil"									,0x00000000,	ItemType.SWORD, '|',	    0,	  35,	16,   1,  30,	0,   0,	 0,   0,new int[]{1,5}	,  2),
			new Treasure("& Katana"									,0x00000000,	ItemType.SWORD, '|',	    0,	 400,	17,   1, 120,	0,   0,	 0,   0,new int[]{3,4}	, 18),
			new Treasure("& Longsword"								,0x00000000,	ItemType.SWORD, '|',	    0,	 300,	18,   1, 130,	0,   0,	 0,   0,new int[]{1,10} , 12),
			new Treasure("& Two-Handed Sword (No-Dachi)"		,0x00000000,	ItemType.SWORD, '|',	    0,	 675,	19,   1, 200,	0,   0,	 0,   0,new int[]{4,4}	, 45),
			new Treasure("& Rapier"									,0x00000000,	ItemType.SWORD, '|',	    0,	  42,	20,   1,  40,	0,   0,	 0,   0,new int[]{1,6}	,  4),
			new Treasure("& Sabre"									,0x00000000,	ItemType.SWORD, '|',	    0,	  50,	21,   1,  50,	0,   0,	 0,   0,new int[]{1,7}	,  5),
			new Treasure("& Small Sword"							,0x00000000,	ItemType.SWORD, '|',	    0,	  48,	22,   1,  75,	0,   0,	 0,   0,new int[]{1,6}	,  5),
			new Treasure("& Two-Handed Sword (Zweihander)"	,0x00000000,	ItemType.SWORD, '|',	    0,	1500,	23,   1, 280,	0,   0,	 0,   0,new int[]{4,6}	, 50),
			new Treasure("& Broken sword"							,0x00000000,	ItemType.SWORD, '|',	    0,	   0,	24,   1,  75,  -2,  -2,	 0,   0,new int[]{1,1}	,  0),
			new Treasure("& Ball and Chain"						,0x00000000,	ItemType.HAFTED, '\\',    0,	 200,	1,   1, 150,	0,   0,	 0,   0,new int[]{2,4}	, 20),
			new Treasure("& Cat-O-Nine Tails"					,0x00000000,	ItemType.HAFTED, '\\',    0,	  14,	2,   1,  40,	0,   0,	 0,   0,new int[]{1,4}	,  3),
			new Treasure("& Wooden Club"							,0x00000000,	ItemType.HAFTED, '\\',    0,	  10,	3,   1, 100,	0,   0,	 0,   0,new int[]{1,3}	,  0),
			new Treasure("& Flail"									,0x00000000,	ItemType.HAFTED, '\\',    0,	 353,	4,   1, 150,	0,   0,	 0,   0,new int[]{2,6}	, 12),
			new Treasure("& Two-Handed Great Flail"			,0x00000000,	ItemType.HAFTED, '\\',    0,	 590,	5,   1, 280,	0,   0,	 0,   0,new int[]{3,6}	, 45),
			new Treasure("& Morningstar"							,0x00000000,	ItemType.HAFTED, '\\',    0,	 396,	6,   1, 150,	0,   0,	 0,   0,new int[]{2,6}	, 10),
			new Treasure("& Mace"									,0x00000000,	ItemType.HAFTED, '\\',    0,	 130,	7,   1, 120,	0,   0,	 0,   0,new int[]{2,4}	,  6),
			new Treasure("& War Hammer"							,0x00000000,	ItemType.HAFTED, '\\',    0,	 225,	8,   1, 120,	0,   0,	 0,   0,new int[]{3,3}	,  5),
			new Treasure("& Mace (Lead-filled)"					,0x00000000,	ItemType.HAFTED, '\\',    0,	 502,	9,   1, 180,	0,   0,	 0,   0,new int[]{3,4}	, 15),
			new Treasure("& Awl-Pike"								,0x00000000,	ItemType.POLEARM, '/',    0,	 340,	1,   1, 160,	0,   0,	 0,   0,new int[]{1,8}	,  8),
			new Treasure("& Beaked Axe"							,0x00000000,	ItemType.POLEARM, '/',    0,	 408,	2,   1, 180,	0,   0,	 0,   0,new int[]{2,6}	, 15),
			new Treasure("& Fauchard"								,0x00000000,	ItemType.POLEARM, '/',    0,	 376,	3,   1, 170,	0,   0,	 0,   0,new int[]{1,10} , 17),
			new Treasure("& Glaive"									,0x00000000,	ItemType.POLEARM, '/',    0,	 363,	4,   1, 190,	0,   0,	 0,   0,new int[]{2,6}	, 20),
			new Treasure("& Halberd"								,0x00000000,	ItemType.POLEARM, '/',    0,	 430,	5,   1, 190,	0,   0,	 0,   0,new int[]{3,4}	, 22),
			new Treasure("& Lucerne Hammer"						,0x00000000,	ItemType.POLEARM, '/',    0,	 376,	6,   1, 120,	0,   0,	 0,   0,new int[]{2,5}	, 11),
			new Treasure("& Pike"									,0x00000000,	ItemType.POLEARM, '/',    0,	 358,	7,   1, 160,	0,   0,	 0,   0,new int[]{2,5}	, 15),
			new Treasure("& Spear"									,0x00000000,	ItemType.POLEARM, '/',    0,	  36,	8,   1,  50,	0,   0,	 0,   0,new int[]{1,6}	,  5),
			new Treasure("& Lance"									,0x00000000,	ItemType.POLEARM, '/',    0,	 230,	9,   1, 300,	0,   0,	 0,   0,new int[]{2,8}	, 10),
			new Treasure("& Javelin"								,0x00000000,	ItemType.POLEARM, '/',    0,	  18,	10,   1,  30,	0,   0,	 0,   0,new int[]{1,4}	,  4),
			new Treasure("& Battle Axe (Balestarius)"			,0x00000000,	ItemType.POLEARM, '/',    0,	 500,	11,   1, 180,	0,   0,	 0,   0,new int[]{2,8}	, 30),
			new Treasure("& Battle Axe (European)"				,0x00000000,	ItemType.POLEARM, '/',    0,	 334,	12,   1, 170,	0,   0,	 0,   0,new int[]{3,4}	, 13),
			new Treasure("& Broad Axe"								,0x00000000,	ItemType.POLEARM, '/',    0,	 304,	13,   1, 160,	0,   0,	 0,   0,new int[]{2,6}	, 17),
			new Treasure("& Short Bow"								,0x00000000,	ItemType.BOW, '}',	    2,	  50,	1,   1,  30,	0,   0,	 0,   0,new int[]{0,0}	,  3),
			new Treasure("& Long Bow"								,0x00000000,	ItemType.BOW, '}',	    3,	 120,	2,   1,  40,	0,   0,	 0,   0,new int[]{0,0}	, 10),
			new Treasure("& Composite Bow"						,0x00000000,	ItemType.BOW, '}',	    4,	 240,	3,   1,  40,	0,   0,	 0,   0,new int[]{0,0}	, 40),
			new Treasure("& Light Crossbow"						,0x00000000,	ItemType.BOW, '}',	    5,	 140,	10,   1, 110,	0,   0,	 0,   0,new int[]{0,0}	, 15),
			new Treasure("& Heavy Crossbow"						,0x00000000,	ItemType.BOW, '}',	    6,	 300,	11,   1, 200,	0,   0,	 0,   0,new int[]{1,1}	, 30),
			new Treasure("& Sling"									,0x00000000,	ItemType.BOW, '}',	    1,	   5,	20,   1,   5,	0,   0,	 0,   0,new int[]{0,0}	,  1),
			new Treasure("& Arrow~"									,0x00000000,	ItemType.ARROW, '{',	    0,	   1, 193,   1,   2,	0,   0,	 0,   0,new int[]{1,4}	,  2),
			new Treasure("& Bolt~"									,0x00000000,	ItemType.BOLT, '{',	    0,	   2, 193,   1,   3,	0,   0,	 0,   0,new int[]{1,5}	,  2),
			new Treasure("& Rounded Pebble~"						,0x00000000,	ItemType.SLING_AMMO, '{',    0,	   1, 193,   1,   4,	0,   0,	 0,   0,new int[]{1,2}	,  0),
			new Treasure("& Iron Shot~"							,0x00000000,	ItemType.SLING_AMMO, '{',    0,	   2, 194,   1,   5,	0,   0,	 0,   0,new int[]{1,3}	,  3),
			new Treasure("& Iron Spike~"							,0x00000000,	ItemType.SPIKE, '~',	    0,	   1, 193,   1,  10,	0,   0,	 0,   0,new int[]{1,1}	,  1),
			new Treasure("& Brass Lantern~"						,0x00000000,	ItemType.LIGHT, '~',	 7500,	  35,	1,   1,  50,	0,   0,	 0,   0,new int[]{1,1}	,  1),
			new Treasure("& Wooden Torch~"						,0x00000000,	ItemType.LIGHT, '~',	 4000,	   2, 193,   1,  30,	0,   0,	 0,   0,new int[]{1,1}	,  1),
			new Treasure("& Orcish Pick"							,0x20000000,	ItemType.DIGGING, '\\',    2,	 500,	2,   1, 180,	0,   0,	 0,   0,new int[]{1,3}	, 20),
			new Treasure("& Dwarven Pick"							,0x20000000,	ItemType.DIGGING, '\\',    3,	1200,	3,   1, 200,	0,   0,	 0,   0,new int[]{1,4}	, 50),
			new Treasure("& Gnomish Shovel"						,0x20000000,	ItemType.DIGGING, '\\',    1,	 100,	5,   1,  50,	0,   0,	 0,   0,new int[]{1,2}	, 20),
			new Treasure("& Dwarven Shovel"						,0x20000000,	ItemType.DIGGING, '\\',    2,	 250,	6,   1, 120,	0,   0,	 0,   0,new int[]{1,3}	, 40),
			new Treasure("& Pair of Soft Leather Shoes"		,0x00000000,	ItemType.BOOTS, ']',	    0,	   4,	1,   1,   5,	0,   0,	 1,   0,new int[]{0,0}	,  1),
			new Treasure("& Pair of Soft Leather Boots"		,0x00000000,	ItemType.BOOTS, ']',	    0,	   7,	2,   1,  20,	0,   0,	 2,   0,new int[]{1,1}	,  4),
			new Treasure("& Pair of Hard Leather Boots"		,0x00000000,	ItemType.BOOTS, ']',	    0,	  12,	3,   1,  40,	0,   0,	 3,   0,new int[]{1,1}	,  6),
			new Treasure("& Soft Leather Cap"					,0x00000000,	ItemType.HELM, ']',	    0,	   4,	1,   1,  10,	0,   0,	 1,   0,new int[]{0,0}	,  2),
			new Treasure("& Hard Leather Cap"					,0x00000000,	ItemType.HELM, ']',	    0,	  12,	2,   1,  15,	0,   0,	 2,   0,new int[]{0,0}	,  4),
			new Treasure("& Metal Cap"								,0x00000000,	ItemType.HELM, ']',	    0,	  30,	3,   1,  20,	0,   0,	 3,   0,new int[]{1,1}	,  7),
			new Treasure("& Iron Helm"								,0x00000000,	ItemType.HELM, ']',	    0,	  75,	4,   1,  75,	0,   0,	 5,   0,new int[]{1,3}	, 20),
			new Treasure("& Steel Helm"							,0x00000000,	ItemType.HELM, ']',	    0,	 200,	5,   1,  60,	0,   0,	 6,   0,new int[]{1,3}	, 40),
			new Treasure("& Silver Crown"							,0x00000000,	ItemType.HELM, ']',	    0,	 500,	6,   1,  20,	0,   0,	 0,   0,new int[]{1,1}	, 44),
			new Treasure("& Golden Crown"							,0x00000000,	ItemType.HELM, ']',	    0,	1000,	7,   1,  30,	0,   0,	 0,   0,new int[]{1,1}	, 47),
			new Treasure("& Jewel-Encrusted Crown"				,0x00000000,	ItemType.HELM, ']',	    0,	2000,	8,   1,  40,	0,   0,	 0,   0,new int[]{1,1}	, 50),
			new Treasure("& Robe"									,0x00000000,	ItemType.SOFT_ARMOR, '(',    0,	   4,	1,   1,  20,	0,   0,	 2,   0,new int[]{0,0}	,  1),
			new Treasure("Soft Leather Armor"					,0x00000000,	ItemType.SOFT_ARMOR, '(',    0,	  18,	2,   1,  80,	0,   0,	 4,   0,new int[]{0,0}	,  2),
			new Treasure("Soft Studded Leather"					,0x00000000,	ItemType.SOFT_ARMOR, '(',    0,	  35,	3,   1,  90,	0,   0,	 5,   0,new int[]{1,1}	,  3),
			new Treasure("Hard Leather Armor"					,0x00000000,	ItemType.SOFT_ARMOR, '(',    0,	  55,	4,   1, 100,  -1,   0,	 6,   0,new int[]{1,1}	,  5),
			new Treasure("Hard Studded Leather"					,0x00000000,	ItemType.SOFT_ARMOR, '(',    0,	 100,	5,   1, 110,  -1,   0,	 7,   0,new int[]{1,2}	,  7),
			new Treasure("Woven Cord Armor"						,0x00000000,	ItemType.SOFT_ARMOR, '(',    0,	  45,	6,   1, 150,  -1,   0,	 6,   0,new int[]{0,0}	,  7),
			new Treasure("Soft Leather Ring Mail"				,0x00000000,	ItemType.SOFT_ARMOR, '(',    0,	 160,	7,   1, 130,  -1,   0,	 6,   0,new int[]{1,2}	, 10),
			new Treasure("Hard Leather Ring Mail"				,0x00000000,	ItemType.SOFT_ARMOR, '(',    0,	 230,	8,   1, 150,  -2,   0,	 8,   0,new int[]{1,3}	, 12),
			new Treasure("Leather Scale Mail"					,0x00000000,	ItemType.SOFT_ARMOR, '(',    0,	 330,	9,   1, 140,  -1,   0,	11,   0,new int[]{1,1}	, 14),
			new Treasure("Metal Scale Mail"						,0x00000000,	ItemType.HARD_ARMOR, '[',    0,	 430,	1,   1, 250,  -2,   0,	13,   0,new int[]{1,4}	, 24),
			new Treasure("Chain Mail"								,0x00000000,	ItemType.HARD_ARMOR, '[',    0,	 530,	2,   1, 220,  -2,   0,	14,   0,new int[]{1,4}	, 26),
			new Treasure("Rusty Chain Mail"						,0x00000000,	ItemType.HARD_ARMOR, '[',    0,	   0,	3,   1, 200,  -5,   0,	14,  -8,new int[]{1,4}	, 26),
			new Treasure("Double Chain Mail"						,0x00000000,	ItemType.HARD_ARMOR, '[',    0,	 630,	4,   1, 260,  -2,   0,	15,   0,new int[]{1,4}	, 28),
			new Treasure("Augmented Chain Mail"					,0x00000000,	ItemType.HARD_ARMOR, '[',    0,	 675,	5,   1, 270,  -2,   0,	16,   0,new int[]{1,4}	, 30),
			new Treasure("Bar Chain Mail"							,0x00000000,	ItemType.HARD_ARMOR, '[',    0,	 720,	6,   1, 280,  -2,   0,	18,   0,new int[]{1,4}	, 34),
			new Treasure("Metal Brigandine Armor"				,0x00000000,	ItemType.HARD_ARMOR, '[',    0,	 775,	7,   1, 290,  -3,   0,	19,   0,new int[]{1,4}	, 36),
			new Treasure("Laminated Armor"						,0x00000000,	ItemType.HARD_ARMOR, '[',    0,	 825,	8,   1, 300,  -3,   0,	20,   0,new int[]{1,4}	, 38),
			new Treasure("Partial Plate Armor"					,0x00000000,	ItemType.HARD_ARMOR, '[',    0,	 900,	9,   1, 260,  -3,   0,	22,   0,new int[]{1,6}	, 42),
			new Treasure("Metal Lamellar Armor"					,0x00000000,	ItemType.HARD_ARMOR, '[',    0,	 950,	10,   1, 340,  -3,   0,	23,   0,new int[]{1,6}	, 44),
			new Treasure("Full Plate Armor"						,0x00000000,	ItemType.HARD_ARMOR, '[',    0,	1050,	11,   1, 380,  -3,   0,	25,   0,new int[]{2,4}	, 48),
			new Treasure("Ribbed Plate Armor"					,0x00000000,	ItemType.HARD_ARMOR, '[',    0,	1200,	12,   1, 380,  -3,   0,	28,   0,new int[]{2,4}	, 50),
			new Treasure("& Cloak"									,0x00000000,	ItemType.CLOAK, '(',	    0,	   3,	1,   1,  10,	0,   0,	 1,   0,new int[]{0,0}	,  1),
			new Treasure("& Set of Leather Gloves"				,0x00000000,	ItemType.GLOVES, ']',	    0,	   3,	1,   1,   5,	0,   0,	 1,   0,new int[]{0,0}	,  1),
			new Treasure("& Set of Gauntlets"					,0x00000000,	ItemType.GLOVES, ']',	    0,	  35,	2,   1,  25,	0,   0,	 2,   0,new int[]{1,1}	, 12),
			new Treasure("& Small Leather Shield"				,0x00000000,	ItemType.SHIELD, ')',	    0,	  30,	1,   1,  50,	0,   0,	 2,   0,new int[]{1,1}	,  3),
			new Treasure("& Medium Leather Shield"				,0x00000000,	ItemType.SHIELD, ')',	    0,	  60,	2,   1,  75,	0,   0,	 3,   0,new int[]{1,2}	,  8),
			new Treasure("& Large Leather Shield"				,0x00000000,	ItemType.SHIELD, ')',	    0,	 120,	3,   1, 100,	0,   0,	 4,   0,new int[]{1,2}	, 15),
			new Treasure("& Small Metal Shield"					,0x00000000,	ItemType.SHIELD, ')',	    0,	  50,	4,   1,  65,	0,   0,	 3,   0,new int[]{1,2}	, 10),
			new Treasure("& Medium Metal Shield"				,0x00000000,	ItemType.SHIELD, ')',	    0,	 125,	5,   1,  90,	0,   0,	 4,   0,new int[]{1,3}	, 20),
			new Treasure("& Large Metal Shield"					,0x00000000,	ItemType.SHIELD, ')',	    0,	 200,	6,   1, 120,	0,   0,	 5,   0,new int[]{1,3}	, 30),
			new Treasure("Gain Strength"							,0x00000001,	ItemType.RING, '=',	    0,	 400,	0,   1,   2,	0,   0,	 0,   0,new int[]{0,0}	, 30),
			new Treasure("Gain Dexterity"							,0x00000008,	ItemType.RING, '=',	    0,	 400,	1,   1,   2,	0,   0,	 0,   0,new int[]{0,0}	, 30),
			new Treasure("Gain Constitution"						,0x00000010,	ItemType.RING, '=',	    0,	 400,	2,   1,   2,	0,   0,	 0,   0,new int[]{0,0}	, 30),
			new Treasure("Gain Intelligence"						,0x00000002,	ItemType.RING, '=',	    0,	 350,	3,   1,   2,	0,   0,	 0,   0,new int[]{0,0}	, 30),
			new Treasure("Speed"										,0x00001000,	ItemType.RING, '=',	    0,	3000,	4,   1,   2,	0,   0,	 0,   0,new int[]{0,0}	, 50),
			new Treasure("Searching"								,0x00000040,	ItemType.RING, '=',	    0,	 250,	5,   1,   2,	0,   0,	 0,   0,new int[]{0,0}	,  7),
			new Treasure("Teleportation"							,0x80000400,	ItemType.RING, '=',	    0,	   0,	6,   1,   2,	0,   0,	 0,   0,new int[]{0,0}	,  7),
			new Treasure("Slow Digestion"							,0x00000080,	ItemType.RING, '=',	    0,	 250,	7,   1,   2,	0,   0,	 0,   0,new int[]{0,0}	,  7),
			new Treasure("Resist Fire"								,0x00080000,	ItemType.RING, '=',	    0,	 250,	8,   1,   2,	0,   0,	 0,   0,new int[]{0,0}	, 14),
			new Treasure("Resist Cold"								,0x00200000,	ItemType.RING, '=',	    0,	 250,	9,   1,   2,	0,   0,	 0,   0,new int[]{0,0}	, 14),
			new Treasure("Feather Falling"						,0x04000000,	ItemType.RING, '=',	    0,	 200,	10,   1,   2,	0,   0,	 0,   0,new int[]{0,0}	,  7),
			new Treasure("Adornment"								,0x00000000,	ItemType.RING, '=',	    0,	  20,	11,   1,   2,	0,   0,	 0,   0,new int[]{0,0}	,  7),
			/* was a ring of adornment, SubType = 12here */
			new Treasure("& Arrow~"									,0x00000000,	ItemType.ARROW, '{',	    0,	   1, 193,   1,   2,	0,   0,	 0,   0,new int[]{1,4}	, 15),
			new Treasure("Weakness"									,0x80000001,	ItemType.RING, '=',	   -5,	   0,	13,   1,   2,	0,   0,	 0,   0,new int[]{0,0}	,  7),
			new Treasure("Lordly Protection (Fire)"			,0x00080000,	ItemType.RING, '=',	    0,	1200,	14,   1,   2,	0,   0,	 0,   5,new int[]{0,0}	, 50),
			new Treasure("Lordly Protection (Acid"				,0x00100000,	ItemType.RING, '=',	    0,	1200,	15,   1,   2,	0,   0,	 0,   5,new int[]{0,0}	, 50),
			new Treasure("Lordly Protection (COLD)"			,0x00200000,	ItemType.RING, '=',	    0,	1200,	16,   1,   2,	0,   0,	 0,   5,new int[]{0,0}	, 50),
			new Treasure("WOE"										,0x80000644,	ItemType.RING, '=',	   -5,	   0,	17,   1,   2,	0,   0,	 0,  -3,new int[]{0,0}	, 50),
			new Treasure("Stupidity"								,0x80000002,	ItemType.RING, '=',	   -5,	   0,	18,   1,   2,	0,   0,	 0,   0,new int[]{0,0}	,  7),
			new Treasure("Increase Damage"						,0x00000000,	ItemType.RING, '=',	    0,	 100,	19,   1,   2,	0,   0,	 0,   0,new int[]{0,0}	, 20),
			new Treasure("Increase To-Hit"						,0x00000000,	ItemType.RING, '=',	    0,	 100,	20,   1,   2,	0,   0,	 0,   0,new int[]{0,0}	, 20),
			new Treasure("Protection"								,0x00000000,	ItemType.RING, '=',	    0,	 100,	21,   1,   2,	0,   0,	 0,   0,new int[]{0,0}	,  7),
			new Treasure("Aggravate Monster"						,0x80000200,	ItemType.RING, '=',	    0,	   0,	22,   1,   2,	0,   0,	 0,   0,new int[]{0,0}	,  7),
			new Treasure("See Invisible"							,0x01000000,	ItemType.RING, '=',	    0,	 340,	23,   1,   2,	0,   0,	 0,   0,new int[]{0,0}	, 40),
			new Treasure("Sustain Strength"						,0x00400000,	ItemType.RING, '=',	    1,	 750,	24,   1,   2,	0,   0,	 0,   0,new int[]{0,0}	, 44),
			new Treasure("Sustain Intelligence"					,0x00400000,	ItemType.RING, '=',	    2,	 600,	25,   1,   2,	0,   0,	 0,   0,new int[]{0,0}	, 44),
			new Treasure("Sustain Wisdom"							,0x00400000,	ItemType.RING, '=',	    3,	 600,	26,   1,   2,	0,   0,	 0,   0,new int[]{0,0}	, 44),
			new Treasure("Sustain Constitution"					,0x00400000,	ItemType.RING, '=',	    4,	 750,	27,   1,   2,	0,   0,	 0,   0,new int[]{0,0}	, 44),
			new Treasure("Sustain Dexterity"						,0x00400000,	ItemType.RING, '=',	    5,	 750,	28,   1,   2,	0,   0,	 0,   0,new int[]{0,0}	, 44),
			new Treasure("Sustain Charisma"						,0x00400000,	ItemType.RING, '=',	    6,	 500,	29,   1,   2,	0,   0,	 0,   0,new int[]{0,0}	, 44),
			new Treasure("Slaying"									,0x00000000,	ItemType.RING, '=',	    0,	1000,	30,   1,   2,	0,   0,	 0,   0,new int[]{0,0}	, 50),
			new Treasure("Wisdom"									,0x00000004,	ItemType.AMULET, '"',	    0,	 300,	0,   1,   3,	0,   0,	 0,   0,new int[]{0,0}	, 20),
			new Treasure("Charisma"									,0x00000020,	ItemType.AMULET, '"',	    0,	 250,	1,   1,   3,	0,   0,	 0,   0,new int[]{0,0}	, 20),
			new Treasure("Searching"								,0x00000040,	ItemType.AMULET, '"',	    0,	 250,	2,   1,   3,	0,   0,	 0,   0,new int[]{0,0}	, 14),
			new Treasure("Teleportation"							,0x80000400,	ItemType.AMULET, '"',	    0,	   0,	3,   1,   3,	0,   0,	 0,   0,new int[]{0,0}	, 14),
			new Treasure("Slow Digestion"							,0x00000080,	ItemType.AMULET, '"',	    0,	 200,	4,   1,   3,	0,   0,	 0,   0,new int[]{0,0}	, 14),
			new Treasure("Resist Acid"								,0x00100000,	ItemType.AMULET, '"',	    0,	 300,	5,   1,   3,	0,   0,	 0,   0,new int[]{0,0}	, 24),
			new Treasure("Adornment"								,0x00000000,	ItemType.AMULET, '"',	    0,	  20,	6,   1,   3,	0,   0,	 0,   0,new int[]{0,0}	, 16),
			/* was an amulet of adornment here, SubType = 7 */
			new Treasure("& Bolt~"									,0x00000000, ItemType.BOLT,	'{',	    0,	   2, 193,   1,   3,	0,   0,	 0,   0,new int[]{1,5}	, 25),
			new Treasure("the Magi"									,0x01800040, ItemType.AMULET, '"',	    0,	5000,	8,   1,   3,	0,   0,	 0,   3,new int[]{0,0}	, 50),
			new Treasure("DOOM"										,0x8000007F, ItemType.AMULET, '"',	   -5,	   0,	9,   1,   3,	0,   0,	 0,   0,new int[]{0,0}	, 50),
			new Treasure("Enchant Weapon To-Hit"				,0x00000001, ItemType.SCROLL1, '?',    0,	 125,	64,   1,   5,	0,   0,	 0,   0,new int[]{0,0}	, 12),
			new Treasure("Enchant Weapon To-Dam"				,0x00000002, ItemType.SCROLL1, '?',    0,	 125,	65,   1,   5,	0,   0,	 0,   0,new int[]{0,0}	, 12),
			new Treasure("Enchant Armor"							,0x00000004, ItemType.SCROLL1, '?',    0,	 125,	66,   1,   5,	0,   0,	 0,   0,new int[]{0,0}	, 12),
			new Treasure("Identify"									,0x00000008, ItemType.SCROLL1, '?',    0,	  50,	67,   1,   5,	0,   0,	 0,   0,new int[]{0,0}	,  1),
			new Treasure("Identify"									,0x00000008, ItemType.SCROLL1, '?',    0,	  50,	67,   1,   5,	0,   0,	 0,   0,new int[]{0,0}	,  5),
			new Treasure("Identify"									,0x00000008, ItemType.SCROLL1, '?',    0,	  50,	67,   1,   5,	0,   0,	 0,   0,new int[]{0,0}	, 10),
			new Treasure("Identify"									,0x00000008, ItemType.SCROLL1, '?',    0,	  50,	67,   1,   5,	0,   0,	 0,   0,new int[]{0,0}	, 30),
			new Treasure("Remove Curse"							,0x00000010, ItemType.SCROLL1, '?',    0,	 100,	68,   1,   5,	0,   0,	 0,   0,new int[]{0,0}	,  7),
			new Treasure("Light"										,0x00000020, ItemType.SCROLL1, '?',    0,	  15,	69,   1,   5,	0,   0,	 0,   0,new int[]{0,0}	,  0),
			new Treasure("Light"										,0x00000020, ItemType.SCROLL1, '?',    0,	  15,	69,   1,   5,	0,   0,	 0,   0,new int[]{0,0}	,  3),
			new Treasure("Light"										,0x00000020, ItemType.SCROLL1, '?',    0,	  15,	69,   1,   5,	0,   0,	 0,   0,new int[]{0,0}	,  7),
			new Treasure("Summon Monster"							,0x00000040, ItemType.SCROLL1, '?',    0,	   0,	70,   1,   5,	0,   0,	 0,   0,new int[]{0,0}	,  1),
			new Treasure("Phase Door"								,0x00000080, ItemType.SCROLL1, '?',    0,	  15,	71,   1,   5,	0,   0,	 0,   0,new int[]{0,0}	,  1),
			new Treasure("Teleport"									,0x00000100, ItemType.SCROLL1, '?',    0,	  40,	72,   1,   5,	0,   0,	 0,   0,new int[]{0,0}	, 10),
			new Treasure("Teleport Level"							,0x00000200, ItemType.SCROLL1, '?',    0,	  50,	73,   1,   5,	0,   0,	 0,   0,new int[]{0,0}	, 20),
			new Treasure("Monster Confusion"						,0x00000400, ItemType.SCROLL1, '?',    0,	  30,	74,   1,   5,	0,   0,	 0,   0,new int[]{0,0}	,  5),
			new Treasure("Magic Mapping"							,0x00000800, ItemType.SCROLL1, '?',    0,	  40,	75,   1,   5,	0,   0,	 0,   0,new int[]{0,0}	,  5),
			new Treasure("Sleep Monster"							,0x00001000, ItemType.SCROLL1, '?',    0,	  35,	76,   1,   5,	0,   0,	 0,   0,new int[]{0,0}	,  5),
			new Treasure("Rune of Protection"					,0x00002000, ItemType.SCROLL1, '?',    0,	 500,	77,   1,   5,	0,   0,	 0,   0,new int[]{0,0}	, 50),
			new Treasure("Treasure Detection"					,0x00004000, ItemType.SCROLL1, '?',    0,	  15,	78,   1,   5,	0,   0,	 0,   0,new int[]{0,0}	,  0),
			new Treasure("Object Detection"						,0x00008000, ItemType.SCROLL1, '?',    0,	  15,	79,   1,   5,	0,   0,	 0,   0,new int[]{0,0}	,  0),
			new Treasure("Trap Detection"							,0x00010000, ItemType.SCROLL1, '?',    0,	  35,	80,   1,   5,	0,   0,	 0,   0,new int[]{0,0}	,  5),
			new Treasure("Trap Detection"							,0x00010000, ItemType.SCROLL1, '?',    0,	  35,	80,   1,   5,	0,   0,	 0,   0,new int[]{0,0}	,  8),
			new Treasure("Trap Detection"							,0x00010000, ItemType.SCROLL1, '?',    0,	  35,	80,   1,   5,	0,   0,	 0,   0,new int[]{0,0}	, 12),
			new Treasure("Door/Stair Location"					,0x00020000, ItemType.SCROLL1, '?',    0,	  35,	81,   1,   5,	0,   0,	 0,   0,new int[]{0,0}	,  5),
			new Treasure("Door/Stair Location"					,0x00020000, ItemType.SCROLL1, '?',    0,	  35,	81,   1,   5,	0,   0,	 0,   0,new int[]{0,0}	, 10),
			new Treasure("Door/Stair Location"					,0x00020000, ItemType.SCROLL1, '?',    0,	  35,	81,   1,   5,	0,   0,	 0,   0,new int[]{0,0}	, 15),
			new Treasure("Mass Genocide"							,0x00040000, ItemType.SCROLL1, '?',    0,	1000,	82,   1,   5,	0,   0,	 0,   0,new int[]{0,0}	, 50),
			new Treasure("Detect Invisible"						,0x00080000, ItemType.SCROLL1, '?',    0,	  15,	83,   1,   5,	0,   0,	 0,   0,new int[]{0,0}	,  1),
			new Treasure("Aggravate Monster"						,0x00100000, ItemType.SCROLL1, '?',    0,	   0,	84,   1,   5,	0,   0,	 0,   0,new int[]{0,0}	,  5),
			new Treasure("Trap Creation"							,0x00200000, ItemType.SCROLL1, '?',    0,	   0,	85,   1,   5,	0,   0,	 0,   0,new int[]{0,0}	, 12),
			new Treasure("Trap/Door Destruction"				,0x00400000, ItemType.SCROLL1, '?',    0,	  50,	86,   1,   5,	0,   0,	 0,   0,new int[]{0,0}	, 12),
			new Treasure("Door Creation"							,0x00800000, ItemType.SCROLL1, '?',    0,	 100,	87,   1,   5,	0,   0,	 0,   0,new int[]{0,0}	, 12),
			new Treasure("Recharging"								,0x01000000, ItemType.SCROLL1, '?',    0,	 200,	88,   1,   5,	0,   0,	 0,   0,new int[]{0,0}	, 40),
			new Treasure("Genocide"									,0x02000000, ItemType.SCROLL1, '?',    0,	 750,	89,   1,   5,	0,   0,	 0,   0,new int[]{0,0}	, 35),
			new Treasure("Darkness"									,0x04000000, ItemType.SCROLL1, '?',    0,	   0,	90,   1,   5,	0,   0,	 0,   0,new int[]{0,0}	,  1),
			new Treasure("Protection from Evil"					,0x08000000, ItemType.SCROLL1, '?',    0,	  50,	91,   1,   5,	0,   0,	 0,   0,new int[]{0,0}	, 30),
			new Treasure("Create Food"								,0x10000000, ItemType.SCROLL1, '?',    0,	  10,	92,   1,   5,	0,   0,	 0,   0,new int[]{0,0}	,  5),
			new Treasure("Dispel Undead"							,0x20000000, ItemType.SCROLL1, '?',    0,	 200,	93,   1,   5,	0,   0,	 0,   0,new int[]{0,0}	, 40),
			new Treasure("*Enchant Weapon*"						,0x00000001, ItemType.SCROLL2, '?',    0,	 500,	94,   1,   5,	0,   0,	 0,   0,new int[]{0,0}	, 50),
			new Treasure("Curse Weapon"							,0x00000002, ItemType.SCROLL2, '?',    0,	   0,	95,   1,   5,	0,   0,	 0,   0,new int[]{0,0}	, 50),
			new Treasure("*Enchant Armor*"						,0x00000004, ItemType.SCROLL2, '?',    0,	 500,	96,   1,   5,	0,   0,	 0,   0,new int[]{0,0}	, 50),
			new Treasure("Curse Armor"								,0x00000008, ItemType.SCROLL2, '?',    0,	   0,	97,   1,   5,	0,   0,	 0,   0,new int[]{0,0}	, 50),
			new Treasure("Summon Undead"							,0x00000010, ItemType.SCROLL2, '?',    0,	   0,	98,   1,   5,	0,   0,	 0,   0,new int[]{0,0}	, 15),
			new Treasure("Blessing"									,0x00000020, ItemType.SCROLL2, '?',    0,	  15,	99,   1,   5,	0,   0,	 0,   0,new int[]{0,0}	,  1),
			new Treasure("Holy Chant"								,0x00000040, ItemType.SCROLL2, '?',    0,	  40, 100,   1,   5,	0,   0,	 0,   0,new int[]{0,0}	, 12),
			new Treasure("Holy Prayer"								,0x00000080, ItemType.SCROLL2, '?',    0,	  80, 101,   1,   5,	0,   0,	 0,   0,new int[]{0,0}	, 24),
			new Treasure("Word-of-Recall"							,0x00000100, ItemType.SCROLL2, '?',    0,	 150, 102,   1,   5,	0,   0,	 0,   0,new int[]{0,0}	,  5),
			new Treasure("*Destruction*"							,0x00000200, ItemType.SCROLL2, '?',    0,	 250, 103,   1,   5,	0,   0,	 0,   0,new int[]{0,0}	, 40),
			/* SMJ, AJ, Water must be SubType 64-66 resp. for objdes to work */
			new Treasure("Slime Mold Juice"						,0x30000000, ItemType.POTION1, '!',  400,	   2,	64,   1,   4,	0,   0,	 0,   0,new int[]{1,1}	,  0),
			new Treasure("Apple Juice"								,0x00000000, ItemType.POTION1, '!',  250,	   1,	65,   1,   4,	0,   0,	 0,   0,new int[]{1,1}	,  0),
			new Treasure("Water"										,0x00000000, ItemType.POTION1, '!',  200,	   0,	66,   1,   4,	0,   0,	 0,   0,new int[]{1,1}	,  0),
			new Treasure("Gain Strength"							,0x00000001, ItemType.POTION1, '!',    0,	 300,	67,   1,   4,	0,   0,	 0,   0,new int[]{1,1}	, 25),
			new Treasure("Weakness"									,0x00000002, ItemType.POTION1, '!',    0,	   0,	68,   1,   4,	0,   0,	 0,   0,new int[]{1,1}	,  3),
			new Treasure("Restore Strength"						,0x00000004, ItemType.POTION1, '!',    0,	 300,	69,   1,   4,	0,   0,	 0,   0,new int[]{1,1}	, 40),
			new Treasure("Gain Intelligence"						,0x00000008, ItemType.POTION1, '!',    0,	 300,	70,   1,   4,	0,   0,	 0,   0,new int[]{1,1}	, 25),
			new Treasure("Lose Intelligence"						,0x00000010, ItemType.POTION1, '!',    0,	   0,	71,   1,   4,	0,   0,	 0,   0,new int[]{1,1}	, 25),
			new Treasure("Restore Intelligence"					,0x00000020, ItemType.POTION1, '!',    0,	 300,	72,   1,   4,	0,   0,	 0,   0,new int[]{1,1}	, 40),
			new Treasure("Gain Wisdom"								,0x00000040, ItemType.POTION1, '!',    0,	 300,	73,   1,   4,	0,   0,	 0,   0,new int[]{1,1}	, 25),
			new Treasure("Lose Wisdom"								,0x00000080, ItemType.POTION1, '!',    0,	   0,	74,   1,   4,	0,   0,	 0,   0,new int[]{1,1}	, 25),
			new Treasure("Restore Wisdom"							,0x00000100, ItemType.POTION1, '!',    0,	 300,	75,   1,   4,	0,   0,	 0,   0,new int[]{1,1}	, 40),
			new Treasure("Charisma"									,0x00000200, ItemType.POTION1, '!',    0,	 300,	76,   1,   4,	0,   0,	 0,   0,new int[]{1,1}	, 25),
			new Treasure("Ugliness"									,0x00000400, ItemType.POTION1, '!',    0,	   0,	77,   1,   4,	0,   0,	 0,   0,new int[]{1,1}	, 25),
			new Treasure("Restore Charisma"						,0x00000800, ItemType.POTION1, '!',    0,	 300,	78,   1,   4,	0,   0,	 0,   0,new int[]{1,1}	, 40),
			new Treasure("Cure Light Wounds"						,0x10001000, ItemType.POTION1, '!',   50,	  15,	79,   1,   4,	0,   0,	 0,   0,new int[]{1,1}	,  0),
			new Treasure("Cure Light Wounds"						,0x10001000, ItemType.POTION1, '!',   50,	  15,	79,   1,   4,	0,   0,	 0,   0,new int[]{1,1}	,  1),
			new Treasure("Cure Light Wounds"						,0x10001000, ItemType.POTION1, '!',   50,	  15,	79,   1,   4,	0,   0,	 0,   0,new int[]{1,1}	,  2),
			new Treasure("Cure Serious Wounds"					,0x30002000, ItemType.POTION1, '!',  100,	  40,	80,   1,   4,	0,   0,	 0,   0,new int[]{1,1}	,  3),
			new Treasure("Cure Critical Wounds"					,0x70004000, ItemType.POTION1, '!',  100,	 100,	81,   1,   4,	0,   0,	 0,   0,new int[]{1,1}	,  5),
			new Treasure("Healing"									,0x70008000, ItemType.POTION1, '!',  200,	 200,	82,   1,   4,	0,   0,	 0,   0,new int[]{1,1}	, 12),
			new Treasure("Gain Constitution"						,0x00010000, ItemType.POTION1, '!',    0,	 300,	83,   1,   4,	0,   0,	 0,   0,new int[]{1,1}	, 25),
			new Treasure("Gain Experience"						,0x00020000, ItemType.POTION1, '!',    0,	2500,	84,   1,   4,	0,   0,	 0,   0,new int[]{1,1}	, 50),
			new Treasure("Sleep"										,0x00040000, ItemType.POTION1, '!',  100,	   0,	85,   1,   4,	0,   0,	 0,   0,new int[]{1,1}	,  0),
			new Treasure("Blindness"								,0x00080000, ItemType.POTION1, '!',    0,	   0,	86,   1,   4,	0,   0,	 0,   0,new int[]{1,1}	,  0),
			new Treasure("Confusion"								,0x00100000, ItemType.POTION1, '!',   50,	   0,	87,   1,   4,	0,   0,	 0,   0,new int[]{1,1}	,  0),
			new Treasure("Poison"									,0x00200000, ItemType.POTION1, '!',    0,	   0,	88,   1,   4,	0,   0,	 0,   0,new int[]{1,1}	,  3),
			new Treasure("Haste Self"								,0x00400000, ItemType.POTION1, '!',    0,	  75,	89,   1,   4,	0,   0,	 0,   0,new int[]{1,1}	,  1),
			new Treasure("Slowness"									,0x00800000, ItemType.POTION1, '!',   50,	   0,	90,   1,   4,	0,   0,	 0,   0,new int[]{1,1}	,  1),
			new Treasure("Gain Dexterity"							,0x02000000, ItemType.POTION1, '!',    0,	 300,	91,   1,   4,	0,   0,	 0,   0,new int[]{1,1}	, 25),
			new Treasure("Restore Dexterity"						,0x04000000, ItemType.POTION1, '!',    0,	 300,	92,   1,   4,	0,   0,	 0,   0,new int[]{1,1}	, 40),
			new Treasure("Restore Constitution"					,0x68000000, ItemType.POTION1, '!',    0,	 300,	93,   1,   4,	0,   0,	 0,   0,new int[]{1,1}	, 40),
			new Treasure("Lose Experience"						,0x00000002, ItemType.POTION2, '!',    0,	   0,	95,   1,   4,	0,   0,	 0,   0,new int[]{1,1}	, 10),
			new Treasure("Salt Water"								,0x00000004, ItemType.POTION2, '!',    0,	   0,	96,   1,   4,	0,   0,	 0,   0,new int[]{1,1}	,  0),
			new Treasure("Invulnerability"						,0x00000008, ItemType.POTION2, '!',    0,	 250,	97,   1,   4,	0,   0,	 0,   0,new int[]{1,1}	, 40),
			new Treasure("Heroism"									,0x00000010, ItemType.POTION2, '!',    0,	  35,	98,   1,   4,	0,   0,	 0,   0,new int[]{1,1}	,  1),
			new Treasure("Super Heroism"							,0x00000020, ItemType.POTION2, '!',    0,	 100,	99,   1,   4,	0,   0,	 0,   0,new int[]{1,1}	,  3),
			new Treasure("Boldness"									,0x00000040, ItemType.POTION2, '!',    0,	  10, 100,   1,   4,	0,   0,	 0,   0,new int[]{1,1}	,  1),
			new Treasure("Restore Life Levels"					,0x00000080, ItemType.POTION2, '!',    0,	 400, 101,   1,   4,	0,   0,	 0,   0,new int[]{1,1}	, 40),
			new Treasure("Resist Heat"								,0x00000100, ItemType.POTION2, '!',    0,	  30, 102,   1,   4,	0,   0,	 0,   0,new int[]{1,1}	,  1),
			new Treasure("Resist Cold"								,0x00000200, ItemType.POTION2, '!',    0,	  30, 103,   1,   4,	0,   0,	 0,   0,new int[]{1,1}	,  1),
			new Treasure("Detect Invisible"						,0x00000400, ItemType.POTION2, '!',    0,	  50, 104,   1,   4,	0,   0,	 0,   0,new int[]{1,1}	,  3),
			new Treasure("Slow Poison"								,0x00000800, ItemType.POTION2, '!',    0,	  25, 105,   1,   4,	0,   0,	 0,   0,new int[]{1,1}	,  1),
			new Treasure("Neutralize Poison"						,0x00001000, ItemType.POTION2, '!',    0,	  75, 106,   1,   4,	0,   0,	 0,   0,new int[]{1,1}	,  5),
			new Treasure("Restore Mana"							,0x00002000, ItemType.POTION2, '!',    0,	 350, 107,   1,   4,	0,   0,	 0,   0,new int[]{1,1}	, 25),
			new Treasure("Infra-Vision"							,0x00004000, ItemType.POTION2, '!',    0,	  20, 108,   1,   4,	0,   0,	 0,   0,new int[]{1,1}	,  3),
			new Treasure("& Flask~ of oil"						,0x00040000, ItemType.FLASK, '!',	 7500,	   3,	64,   1,  10,	0,   0,	 0,   0,new int[]{2,6}	,  1),
			new Treasure("Light"										,0x00000001, ItemType.WAND, '-',	    0,	 200,	0,   1,  10,	0,   0,	 0,   0,new int[]{1,1}	,  2),
			new Treasure("Lightning Bolts"						,0x00000002, ItemType.WAND, '-',	    0,	 600,	1,   1,  10,	0,   0,	 0,   0,new int[]{1,1}	, 15),
			new Treasure("Frost Bolts"								,0x00000004, ItemType.WAND, '-',	    0,	 800,	2,   1,  10,	0,   0,	 0,   0,new int[]{1,1}	, 20),
			new Treasure("Fire Bolts"								,0x00000008, ItemType.WAND, '-',	    0,	1000,	3,   1,  10,	0,   0,	 0,   0,new int[]{1,1}	, 30),
			new Treasure("Stone-to-Mud"							,0x00000010, ItemType.WAND, '-',	    0,	 300,	4,   1,  10,	0,   0,	 0,   0,new int[]{1,1}	, 12),
			new Treasure("Polymorph"								,0x00000020, ItemType.WAND, '-',	    0,	 400,	5,   1,  10,	0,   0,	 0,   0,new int[]{1,1}	, 20),
			new Treasure("Heal Monster"							,0x00000040, ItemType.WAND, '-',	    0,	   0,	6,   1,  10,	0,   0,	 0,   0,new int[]{1,1}	,  2),
			new Treasure("Haste Monster"							,0x00000080, ItemType.WAND, '-',	    0,	   0,	7,   1,  10,	0,   0,	 0,   0,new int[]{1,1}	,  2),
			new Treasure("Slow Monster"							    ,0x00000100, ItemType.WAND, '-',	    0,	 500,	8,   1,  10,	0,   0,	 0,   0,new int[]{1,1}	,  2),
			new Treasure("Confuse Monster"						    ,0x00000200, ItemType.WAND, '-',	    0,	 400,	9,   1,  10,	0,   0,	 0,   0,new int[]{1,1}	,  2),
			new Treasure("Sleep Monster"							,0x00000400, ItemType.WAND, '-',	    0,	 500,	10,   1,  10,	0,   0,	 0,   0,new int[]{1,1}	,  7),
			new Treasure("Drain Life"								,0x00000800, ItemType.WAND, '-',	    0,	1200,	11,   1,  10,	0,   0,	 0,   0,new int[]{1,1}	, 50),
			new Treasure("Trap/Door Destruction"				    ,0x00001000, ItemType.WAND, '-',	    0,	 100,	12,   1,  10,	0,   0,	 0,   0,new int[]{1,1}	, 12),
			new Treasure("Magic Missile"							,0x00002000, ItemType.WAND, '-',	    0,	 200,	13,   1,  10,	0,   0,	 0,   0,new int[]{1,1}	,  2),
			new Treasure("Wall Building"							,0x00004000, ItemType.WAND, '-',	    0,	 400,	14,   1,  10,	0,   0,	 0,   0,new int[]{1,1}	, 25),
			new Treasure("Clone Monster"							,0x00008000, ItemType.WAND, '-',	    0,	   0,	15,   1,  10,	0,   0,	 0,   0,new int[]{1,1}	, 15),
			new Treasure("Teleport Away"							,0x00010000, ItemType.WAND, '-',	    0,	 350,	16,   1,  10,	0,   0,	 0,   0,new int[]{1,1}	, 20),
			new Treasure("Disarming"								,0x00020000, ItemType.WAND, '-',	    0,	 700,	17,   1,  10,	0,   0,	 0,   0,new int[]{1,1}	, 20),
			new Treasure("Lightning Balls"						    ,0x00040000, ItemType.WAND, '-',	    0,	1200,	18,   1,  10,	0,   0,	 0,   0,new int[]{1,1}	, 35),
			new Treasure("Cold Balls"								,0x00080000, ItemType.WAND, '-',	    0,	1500,	19,   1,  10,	0,   0,	 0,   0,new int[]{1,1}	, 40),
			new Treasure("Fire Balls"								,0x00100000, ItemType.WAND, '-',	    0,	1800,	20,   1,  10,	0,   0,	 0,   0,new int[]{1,1}	, 50),
			new Treasure("Stinking Cloud"							,0x00200000, ItemType.WAND, '-',	    0,	 400,	21,   1,  10,	0,   0,	 0,   0,new int[]{1,1}	,  5),
			new Treasure("Acid Balls"								,0x00400000, ItemType.WAND, '-',	    0,	1650,	22,   1,  10,	0,   0,	 0,   0,new int[]{1,1}	, 48),
			new Treasure("Wonder"									,0x00800000, ItemType.WAND, '-',	    0,	 250,	23,   1,  10,	0,   0,	 0,   0,new int[]{1,1}	,  2),
			new Treasure("Light"									,0x00000001, ItemType.STAFF, '_',	    0,	 250,	0,   1,  50,	0,   0,	 0,   0,new int[]{1,2}	,  5),
			new Treasure("Door/Stair Location"					    ,0x00000002, ItemType.STAFF, '_',	    0,	 350,	1,   1,  50,	0,   0,	 0,   0,new int[]{1,2}	, 10),
			new Treasure("Trap Location"							,0x00000004, ItemType.STAFF, '_',	    0,	 350,	2,   1,  50,	0,   0,	 0,   0,new int[]{1,2}	, 10),
			new Treasure("Treasure Location"						,0x00000008, ItemType.STAFF, '_',	    0,	 200,	3,   1,  50,	0,   0,	 0,   0,new int[]{1,2}	,  5),
			new Treasure("Object Location"						    ,0x00000010, ItemType.STAFF, '_',	    0,	 200,	4,   1,  50,	0,   0,	 0,   0,new int[]{1,2}	,  5),
			new Treasure("Teleportation"							,0x00000020, ItemType.STAFF, '_',	    0,	 400,	5,   1,  50,	0,   0,	 0,   0,new int[]{1,2}	, 20),
			new Treasure("Earthquakes"								,0x00000040, ItemType.STAFF, '_',	    0,	 350,	6,   1,  50,	0,   0,	 0,   0,new int[]{1,2}	, 40),
			new Treasure("Summoning"								,0x00000080, ItemType.STAFF, '_',	    0,	   0,	7,   1,  50,	0,   0,	 0,   0,new int[]{1,2}	, 10),
			new Treasure("Summoning"								,0x00000080, ItemType.STAFF, '_',	    0,	   0,	7,   1,  50,	0,   0,	 0,   0,new int[]{1,2}	, 50),
			new Treasure("*Destruction*"							,0x00000200, ItemType.STAFF, '_',	    0,	2500,	8,   1,  50,	0,   0,	 0,   0,new int[]{1,2}	, 50),
			new Treasure("Starlight"								,0x00000400, ItemType.STAFF, '_',	    0,	 800,	9,   1,  50,	0,   0,	 0,   0,new int[]{1,2}	, 20),
			new Treasure("Haste Monsters"							,0x00000800, ItemType.STAFF, '_',	    0,	   0,	10,   1,  50,	0,   0,	 0,   0,new int[]{1,2}	, 10),
			new Treasure("Slow Monsters"							,0x00001000, ItemType.STAFF, '_',	    0,	 800,	11,   1,  50,	0,   0,	 0,   0,new int[]{1,2}	, 10),
			new Treasure("Sleep Monsters"							,0x00002000, ItemType.STAFF, '_',	    0,	 700,	12,   1,  50,	0,   0,	 0,   0,new int[]{1,2}	, 10),
			new Treasure("Cure Light Wounds"						,0x00004000, ItemType.STAFF, '_',	    0,	 350,	13,   1,  50,	0,   0,	 0,   0,new int[]{1,2}	,  5),
			new Treasure("Detect Invisible"						,0x00008000, ItemType.STAFF, '_',	    0,	 200,	14,   1,  50,	0,   0,	 0,   0,new int[]{1,2}	,  5),
			new Treasure("Speed"										,0x00010000, ItemType.STAFF, '_',	    0,	1000,	15,   1,  50,	0,   0,	 0,   0,new int[]{1,2}	, 40),
			new Treasure("Slowness"									,0x00020000, ItemType.STAFF, '_',	    0,	   0,	16,   1,  50,	0,   0,	 0,   0,new int[]{1,2}	, 40),
			new Treasure("Mass Polymorph"							,0x00040000, ItemType.STAFF, '_',	    0,	 750,	17,   1,  50,	0,   0,	 0,   0,new int[]{1,2}	, 46),
			new Treasure("Remove Curse"							,0x00080000, ItemType.STAFF, '_',	    0,	 500,	18,   1,  50,	0,   0,	 0,   0,new int[]{1,2}	, 47),
			new Treasure("Detect Evil"								,0x00100000, ItemType.STAFF, '_',	    0,	 350,	19,   1,  50,	0,   0,	 0,   0,new int[]{1,2}	, 20),
			new Treasure("Curing"									,0x00200000, ItemType.STAFF, '_',	    0,	1000,	20,   1,  50,	0,   0,	 0,   0,new int[]{1,2}	, 25),
			new Treasure("Dispel Evil"								,0x00400000, ItemType.STAFF, '_',	    0,	1200,	21,   1,  50,	0,   0,	 0,   0,new int[]{1,2}	, 49),
			new Treasure("Darkness"									,0x01000000, ItemType.STAFF, '_',	    0,	   0,	22,   1,  50,	0,   0,	 0,   0,new int[]{1,2}	, 50),
			new Treasure("Darkness"									,0x01000000, ItemType.STAFF, '_',	    0,	   0,	22,   1,  50,	0,   0,	 0,   0,new int[]{1,2}	,  5),
			new Treasure("[Beginners-Magik]"						,0x0000007F, ItemType.MAGIC_BOOK, '?',    0,	  25,	64,   1,  30,   0,   0,	 0,   0,new int[]{1,1}	, 40),
			new Treasure("[Magik I]"								,0x0000FF80, ItemType.MAGIC_BOOK, '?',    0,	 100,	65,   1,  30,   0,   0,	 0,   0,new int[]{1,1}	, 40),
			new Treasure("[Magik II]"								,0x00FF0000, ItemType.MAGIC_BOOK, '?',    0,	 400,	66,   1,  30,   0,   0,	 0,   0,new int[]{1,1}	, 40),
			new Treasure("[The Mages Guide to Power]"			,0x7F000000, ItemType.MAGIC_BOOK, '?',    0,	 800,	67,   1,  30,   0,   0,	 0,   0,new int[]{1,1}	, 40),
			new Treasure("[Beginners Handbook]"					,0x000000FF, ItemType.PRAYER_BOOK, '?',    0,	  25,	64,   1,  30,   0,   0,	 0,   0,new int[]{1,1}	, 40),
			new Treasure("[Words of Wisdom]"						,0x0000FF00, ItemType.PRAYER_BOOK, '?',    0,	 100,	65,   1,  30,   0,   0,	 0,   0,new int[]{1,1}	, 40),
			new Treasure("[Chants and Blessings]"				,0x01FF0000, ItemType.PRAYER_BOOK, '?',    0,	 300,	66,   1,  30,   0,   0,	 0,   0,new int[]{1,1}	, 40),
			new Treasure("[Exorcism and Dispelling]"			,0x7E000000, ItemType.PRAYER_BOOK, '?',    0,	 900,	67,   1,  30,   0,   0,	 0,   0,new int[]{1,1}	, 40),
			new Treasure("& Small wooden chest"					,0x0F000000, ItemType.CHEST, '&',	    0,	  20,	1,   1, 250,	0,   0,	 0,   0,new int[]{2,3}	,  7),
			new Treasure("& Large wooden chest"					,0x15000000, ItemType.CHEST, '&',	    0,	  60,	4,   1, 500,	0,   0,	 0,   0,new int[]{2,5}	, 15),
			new Treasure("& Small iron chest"					,0x0F000000, ItemType.CHEST, '&',	    0,	 100,	7,   1, 300,	0,   0,	 0,   0,new int[]{2,4}	, 25),
			new Treasure("& Large iron chest"					,0x1F000000, ItemType.CHEST, '&',	    0,	 150,	10,   1,1000,	0,   0,	 0,   0,new int[]{2,6}	, 35),
			new Treasure("& Small steel chest"					,0x0F000000, ItemType.CHEST, '&',	    0,	 200,	13,   1, 500,	0,   0,	 0,   0,new int[]{2,4}	, 45),
			new Treasure("& Large steel chest"					,0x23000000, ItemType.CHEST, '&',	    0,	 250,	16,   1,1000,	0,   0,	 0,   0,new int[]{2,6}	, 50),
			new Treasure("& Rat Skeleton"							,0x00000000, ItemType.MISC, 's',	    0,	   0,	1,   1,  10,	0,   0,	 0,   0,new int[]{1,1}	,  1),
			new Treasure("& Giant Centipede Skeleton"			,0x00000000, ItemType.MISC, 's',	    0,	   0,	2,   1,  25,	0,   0,	 0,   0,new int[]{1,1}	,  1),
			new Treasure("some filthy rags"						,0x00000000, ItemType.SOFT_ARMOR, '~',    0,	   0,	63,   1,  20,	0,   0,	 1,   0,new int[]{0,0}	,  0),
			new Treasure("& empty bottle"							,0x00000000, ItemType.MISC, '!',	    0,	   0,	4,   1,   2,	0,   0,	 0,   0,new int[]{1,1}	,  0),
			new Treasure("some shards of pottery"				,0x00000000, ItemType.MISC, '~',	    0,	   0,	5,   1,   5,	0,   0,	 0,   0,new int[]{1,1}	,  0),
			new Treasure("& Human Skeleton"						,0x00000000, ItemType.MISC, 's',	    0,	   0,	7,   1,  50,	0,   0,	 0,   0,new int[]{1,1}	,  1),
			new Treasure("& Dwarf Skeleton"						,0x00000000, ItemType.MISC, 's',	    0,	   0,	8,   1,  60,	0,   0,	 0,   0,new int[]{1,1}	,  1),
			new Treasure("& Elf Skeleton"							,0x00000000, ItemType.MISC, 's',	    0,	   0,	9,   1,  40,	0,   0,	 0,   0,new int[]{1,1}	,  1),
			new Treasure("& Gnome Skeleton"						,0x00000000, ItemType.MISC, 's',	    0,	   0,	10,   1,  25,	0,   0,	 0,   0,new int[]{1,1}	,  1),
			new Treasure("& broken set of teeth"				,0x00000000, ItemType.MISC, 's',	    0,	   0,	11,   1,   3,	0,   0,	 0,   0,new int[]{1,1}	,  0),
			new Treasure("& large broken bone"					,0x00000000, ItemType.MISC, 's',	    0,	   0,	12,   1,   2,	0,   0,	 0,   0,new int[]{1,1}	,  0),
			new Treasure("& broken stick"							,0x00000000, ItemType.MISC, '~',	    0,	   0,	13,   1,   3,	0,   0,	 0,   0,new int[]{1,1}	,  0),

			/* end of Dungeon Items */

			/* Store Items, which are not also dungeon Items, some of these can be   found above, except that the ItemCount is >1 below */
			new Treasure("& Ration~ of Food"						,0x00000000,	ItemType.FOOD, ',',	 5000,	   3,	90,   5,  10,	0,   0,	 0,   0,new int[]{0,0}	,  0),
			new Treasure("& Hard Biscuit~"						,0x00000000,	ItemType.FOOD, ',',	  500,	   1,	93,   5,   2,	0,   0,	 0,   0,new int[]{0,0}	,  0),
			new Treasure("& Strip~ of Beef Jerky"				,0x00000000,	ItemType.FOOD, ',',	 1750,	   2,	94,   5,   2,	0,   0,	 0,   0,new int[]{0,0}	,  0),
			new Treasure("& Pint~ of Fine Ale"					,0x00000000,	ItemType.FOOD, ',',	  500,	   1,	95,   3,  10,	0,   0,	 0,   0,new int[]{0,0}	,  0),
			new Treasure("& Pint~ of Fine Wine"					,0x00000000,	ItemType.FOOD, ',',	  400,	   2,	96,   1,  10,	0,   0,	 0,   0,new int[]{0,0}	,  0),
			new Treasure("& Pick"									,0x20000000,	ItemType.DIGGING, '\\',    1,	  50,	1,   1, 150,	0,   0,	 0,   0,new int[]{1,3}	,  0),
			new Treasure("& Shovel"									,0x20000000,	ItemType.DIGGING, '\\',    0,	  15,	4,   1,  60,	0,   0,	 0,   0,new int[]{1,2}	,  0),
			new Treasure("Identify"									,0x00000008,	ItemType.SCROLL1, '?',    0,	  50,  67,   2,   5,	0,   0,	 0,   0,new int[]{0,0}	,  0),
			new Treasure("Light"										,0x00000020,	ItemType.SCROLL1, '?',    0,	  15,  69,   3,   5,	0,   0,	 0,   0,new int[]{0,0}	,  0),
			new Treasure("Phase Door"								,0x00000080,	ItemType.SCROLL1, '?',    0,	  15,  71,   2,   5,	0,   0,	 0,   0,new int[]{0,0}	,  0),
			new Treasure("Magic Mapping"							,0x00000800,	ItemType.SCROLL1, '?',    0,	  40,  75,   2,   5,	0,   0,	 0,   0,new int[]{0,0}	,  0),
			new Treasure("Treasure Detection"					,0x00004000,	ItemType.SCROLL1, '?',    0,	  15,  78,   2,   5,	0,   0,	 0,   0,new int[]{0,0}	,  0),
			new Treasure("Object Detection"						,0x00008000,	ItemType.SCROLL1, '?',    0,	  15,  79,   2,   5,	0,   0,	 0,   0,new int[]{0,0}	,  0),
			new Treasure("Detect Invisible"						,0x00080000,	ItemType.SCROLL1, '?',    0,	  15,  83,   2,   5,	0,   0,	 0,   0,new int[]{0,0}	,  0),
			new Treasure("Blessing"									,0x00000020,	ItemType.SCROLL2, '?',    0,	  15,  99,   2,   5,	0,   0,	 0,   0,new int[]{0,0}	,  0),
			new Treasure("Word-of-Recall"							,0x00000100,	ItemType.SCROLL2, '?',    0,	 150, 102,   3,   5,	0,   0,	 0,   0,new int[]{0,0}	,  0),
			new Treasure("Cure Light Wounds"						,0x10001000,	ItemType.POTION1, '!',   50,	  15,  79,   2,   4,	0,   0,	 0,   0,new int[]{1,1}	,  0),
			new Treasure("Heroism"									,0x00000010,	ItemType.POTION2, '!',    0,	  35,  98,   2,   4,	0,   0,	 0,   0,new int[]{1,1}	,  0),
			new Treasure("Boldness"									,0x00000040,	ItemType.POTION2, '!',    0,	  10, 100,   2,   4,	0,   0,	 0,   0,new int[]{1,1}	,  0),
			new Treasure("Slow Poison"								,0x00000800,	ItemType.POTION2, '!',    0,	  25, 105,   2,   4,	0,   0,	 0,   0,new int[]{1,1}	,  0),
			new Treasure("& Brass Lantern~"						,0x00000000,	ItemType.LIGHT, '~',	 7500,	  35,	0,   1,  50,	0,   0,	 0,   0,new int[]{1,1}	,  1),
			new Treasure("& Wooden Torch~"						,0x00000000,	ItemType.LIGHT, '~',	 4000,	   2, 192,   5,  30,	0,   0,	 0,   0,new int[]{1,1}	,  1),
			new Treasure("& Flask~ of oil"						,0x00040000,	ItemType.FLASK, '!',	 7500,	   3,	64,   5,  10,	0,   0,	 0,   0,new int[]{2,6}	,  1),
			/* end store Items */

			/* start doors */
			/* Secret door must have same SubType as closed door in	*/
			/* TRAP_LISTB.	See CHANGE_TRAP. Must use & because of stone_to_mud. */
			new Treasure("& open door"								,0x00000000, ItemType.OPEN_DOOR, '\'',    0,	   0,	1,   1,   0,	0,   0,	 0,   0,new int[]{1,1}	,  0),
			new Treasure("& closed door"							,0x00000000, ItemType.CLOSED_DOOR, '+',    0,	   0,	19,   1,   0,	0,   0,	 0,   0,new int[]{1,1}	,  0),
			new Treasure("& secret door"							,0x00000000, ItemType.SECRET_DOOR, '#',    0,	   0,	19,   1,   0,	0,   0,	 0,   0,new int[]{1,1}	,  0),
			/* end doors */

			/* stairs */
			new Treasure("an up staircase "						,0x00000000, ItemType.UP_STAIR, '<',	    0,	   0,	1,   1,   0,	0,   0,	 0,   0,new int[]{1,1}	,  0),
			new Treasure("a down staircase"						,0x00000000, ItemType.DOWN_STAIR, '>',    0,	   0,	1,   1,   0,	0,   0,	 0,   0,new int[]{1,1}	,  0),
			/* store door */

			/* Stores are just special traps		*/
			new Treasure("General Store"						,0x00000000, ItemType.STORE_DOOR, '1',    0,	   0, 101,   1,   0,	0,   0,	 0,   0,new int[]{0,0}	,  0),
			new Treasure("Armory"								,0x00000000, ItemType.STORE_DOOR, '2',    0,	   0, 102,   1,   0,	0,   0,	 0,   0,new int[]{0,0}	,  0),
			new Treasure("Weapon Smiths"						,0x00000000, ItemType.STORE_DOOR, '3',    0,	   0, 103,   1,   0,	0,   0,	 0,   0,new int[]{0,0}	,  0),
			new Treasure("Temple"								,0x00000000, ItemType.STORE_DOOR, '4',    0,	   0, 104,   1,   0,	0,   0,	 0,   0,new int[]{0,0}	,  0),
			new Treasure("Alchemy Shop"							,0x00000000, ItemType.STORE_DOOR, '5',    0,	   0, 105,   1,   0,	0,   0,	 0,   0,new int[]{0,0}	,  0),
			new Treasure("Magic Shop"							,0x00000000, ItemType.STORE_DOOR, '6',    0,	   0, 106,   1,   0,	0,   0,	 0,   0,new int[]{0,0}	,  0),
			/* end store door */

			/* Traps are just Nasty treasures.				*/
			/* Traps: Level represents the relative difficulty of disarming;	*/
			/* and P1 represents the experienced gained when disarmed*/
			new Treasure("an open pit"								,0x00000000, ItemType.VIS_TRAP, ' ',	    1,	   0,	1,   1,   0,	0,   0,	 0,   0,new int[]{2,6}	,50),
			new Treasure("an arrow trap"							,0x00000000, ItemType.INVIS_TRAP, '^',    3,	   0,	2,   1,   0,	0,   0,	 0,   0,new int[]{1,8}	,90),
			new Treasure("a covered pit"							,0x00000000, ItemType.INVIS_TRAP, '^',    2,	   0,	3,   1,   0,	0,   0,	 0,   0,new int[]{2,6}	,60),
			new Treasure("a trap door"								,0x00000000, ItemType.INVIS_TRAP, '^',    5,	   0,	4,   1,   0,	0,   0,	 0,   0,new int[]{2,8}	,75),
			new Treasure("a gas trap"								,0x00000000, ItemType.INVIS_TRAP, '^',    3,	   0,	5,   1,   0,	0,   0,	 0,   0,new int[]{1,4}	,95),
			new Treasure("a loose rock"							,0x00000000, ItemType.INVIS_TRAP, ';',    0,	   0,	6,   1,   0,	0,   0,	 0,   0,new int[]{0,0}	,10),
			new Treasure("a dart trap"								,0x00000000, ItemType.INVIS_TRAP, '^',    5,	   0,	7,   1,   0,	0,   0,	 0,   0,new int[]{1,4}	,110),
			new Treasure("a strange rune"							,0x00000000, ItemType.INVIS_TRAP, '^',    5,	   0,	8,   1,   0,	0,   0,	 0,   0,new int[]{0,0}	,90),
			new Treasure("some loose rock"						,0x00000000, ItemType.INVIS_TRAP, '^',    5,	   0,	9,   1,   0,	0,   0,	 0,   0,new int[]{2,6}	,90),
			new Treasure("a gas trap"								,0x00000000, ItemType.INVIS_TRAP, '^',   10,	   0,	10,   1,   0,	0,   0,	 0,   0,new int[]{1,4}	,105),
			new Treasure("a strange rune"							,0x00000000, ItemType.INVIS_TRAP, '^',    5,	   0,	11,   1,   0,	0,   0,	 0,   0,new int[]{0,0}	,90),
			new Treasure("a blackened spot"						,0x00000000, ItemType.INVIS_TRAP, '^',   10,	   0,	12,   1,   0,	0,   0,	 0,   0,new int[]{4,6}	,110),
			new Treasure("some corroded rock"					,0x00000000, ItemType.INVIS_TRAP, '^',   10,	   0,	13,   1,   0,	0,   0,	 0,   0,new int[]{4,6}	,110),
			new Treasure("a gas trap"								,0x00000000, ItemType.INVIS_TRAP, '^',    5,	   0,	14,   1,   0,	0,   0,	 0,   0,new int[]{2,6}	,105),
			new Treasure("a gas trap"								,0x00000000, ItemType.INVIS_TRAP, '^',    5,	   0,	15,   1,   0,	0,   0,	 0,   0,new int[]{1,4}	,110),
			new Treasure("a gas trap"								,0x00000000, ItemType.INVIS_TRAP, '^',    5,	   0,	16,   1,   0,	0,   0,	 0,   0,new int[]{1,8}	,105),
			new Treasure("a dart trap"								,0x00000000, ItemType.INVIS_TRAP, '^',    5,	   0,	17,   1,   0,	0,   0,	 0,   0,new int[]{1,8}	,110),
			new Treasure("a dart trap"								,0x00000000, ItemType.INVIS_TRAP, '^',    5,	   0,	18,   1,   0,	0,   0,	 0,   0,new int[]{1,8}	,110),
			/* rubble */
			new Treasure("some rubble"								,0x00000000, ItemType.RUBBLE, ':',	    0,	   0,	1,   1,   0,	0,   0,	 0,   0,new int[]{0,0}	,  0),
			/* mush */
			new Treasure("& pint~ of fine grade mush"			,0x00000000, ItemType.FOOD, ',',	 1500,	   0,  97,   1,   1,   0,   0,   0,   0,new int[]{1,1}  ,  1),
			/* Special trap	*/
			new Treasure("a strange rune"							,0x00000000, ItemType.VIS_TRAP, '^',	    0,	   0,	99,   1,   0,	0,   0,	 0,   0,new int[]{0,0}	, 10),
			/* Gold list (All types of gold and gems are defined here)	*/
			new Treasure("copper"									,0x00000000, ItemType.GOLD, '$',	   0,	   3,	1,   1,   0,	0,   0,	 0,   0,new int[]{0,0}	  ,  1),
			new Treasure("copper"									,0x00000000, ItemType.GOLD, '$',    0,	   4,	2,   1,   0,	0,   0,	 0,   0,new int[]{0,0}	  ,  1),
			new Treasure("copper"									,0x00000000, ItemType.GOLD, '$',    0,	   5,	3,   1,   0,	0,   0,	 0,   0,new int[]{0,0}	  ,  1),
			new Treasure("silver"									,0x00000000, ItemType.GOLD, '$',    0,	   6,	4,   1,   0,	0,   0,	 0,   0,new int[]{0,0}	  ,  1),
			new Treasure("silver"									,0x00000000, ItemType.GOLD, '$',    0,	   7,	5,   1,   0,	0,   0,	 0,   0,new int[]{0,0}	  ,  1),
			new Treasure("silver"									,0x00000000, ItemType.GOLD, '$',    0,	   8,	6,   1,   0,	0,   0,	 0,   0,new int[]{0,0}	  ,  1),
			new Treasure("garnets"									,0x00000000, ItemType.GOLD, '*',    0,	   9,	7,   1,   0,	0,   0,	 0,   0,new int[]{0,0}	  ,  1),
			new Treasure("garnets"									,0x00000000, ItemType.GOLD, '*',    0,	  10,	8,   1,   0,	0,   0,	 0,   0,new int[]{0,0}	  ,  1),
			new Treasure("gold"										,0x00000000, ItemType.GOLD, '$',    0,	  12,	9,   1,   0,	0,   0,	 0,   0,new int[]{0,0}	  ,  1),
			new Treasure("gold"										,0x00000000, ItemType.GOLD, '$',    0,	  14,	10,  1,   0,	0,   0,	 0,   0,new int[]{0,0}	  ,  1),
			new Treasure("gold"										,0x00000000, ItemType.GOLD, '$',    0,	  16,	11,  1,   0,	0,   0,	 0,   0,new int[]{0,0}	  ,  1),
			new Treasure("opals"										,0x00000000, ItemType.GOLD, '*',    0,	  18,	12,  1,   0,	0,   0,	 0,   0,new int[]{0,0}	  ,  1),
			new Treasure("sapphires"								,0x00000000, ItemType.GOLD, '*',    0,	  20,	13,  1,   0,	0,   0,	 0,   0,new int[]{0,0}	  ,  1),
			new Treasure("gold"										,0x00000000, ItemType.GOLD, '$',    0,	  24,	14,  1,   0,	0,   0,	 0,   0,new int[]{0,0}	  ,  1),
			new Treasure("rubies"									,0x00000000, ItemType.GOLD, '*',    0,	  28,	15,  1,   0,	0,   0,	 0,   0,new int[]{0,0}	  ,  1),
			new Treasure("diamonds"									,0x00000000, ItemType.GOLD, '*',    0,	  32,	16,  1,   0,	0,   0,	 0,   0,new int[]{0,0}	  ,  1),
			new Treasure("emeralds"									,0x00000000, ItemType.GOLD, '*',    0,	  40,	17,  1,   0,	0,   0,	 0,   0,new int[]{0,0}	  ,  1),
			new Treasure("mithril"									,0x00000000, ItemType.GOLD, '$',	   0,	  80,	18,  1,   0,	0,   0,	 0,   0,new int[]{0,0}	  ,  1),
			/* nothing, used as inventory place holder */
			/* must be stackable, so that can be picked up by inven_carry */
			new Treasure("nothing"									,0x00000000,  ItemType.NOTHING, ' ',	   0,       0,  64,   0,   0,   0,   0,   0,   0,new int[]{0,0}    ,  0),
			/* these next two are needed only for the names */
			new Treasure("& ruined chest"							,0x00000000,   ItemType.CHEST, '&',	   0,	   0,	0,   1, 250,	0,   0,	 0,   0,new int[]{0,0}	,  0),
			
			/* keep this as the last item in the list */
			new Treasure(string.Empty								,0x00000000,  ItemType.NOTHING, ' ',	   0,       0,   0,   0,   0,   0,   0,   0,   0,new int[]{0,0}  ,  0)
			#endregion Dungeon Items from 0 to MAX_DUNGEON_OBJ
		};




    }
}
